<?php
/**
 * Created by PhpStorm.
 * User: robot
 * Date: 2018-04-17
 * Time: 17:30
 */
namespace app\admin\validate;

use think\Validate;
class PublishValidate extends Validate
{
    protected $rule = [
        'title|文章标题' => 'require|max:30',
        'sort|文章分类' => 'require',
        'content|文章内容' => 'require',
    ];
    protected $message = [
        'title.require' => '必须输入文章标题',
        'title.max' => '文章标题过长，最长为30个字',
        'sort.require' => '请确认文章分类',
        'content.require' => '请输入文章内容',
    ];
}